package org.xiaom.butler.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.xiaom.butler.service.HotelService;

import com.opensymphony.xwork2.ActionSupport;
@Controller
public class HotelAction extends ActionSupport {
	@Autowired
	private HotelService hotelService;
	private String id;
	String tip;
	public String addAct() {
		return "success";
	}
	public String getAct(){
		tip=hotelService.get(Integer.parseInt(id)).getName();
		return SUCCESS;
	}
	public String updateAct(){
		hotelService.update(null);
		return SUCCESS;
	}
	public void setHotelService(HotelService hotelService) {
		this.hotelService = hotelService;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTip() {
		return tip;
	}
	
}
